package com.define.ssh.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

/**
 * Deptuser entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "deptuser")
public class Deptuser implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private UserInfo userInfo;
	private Compdept dept;
	
	private Integer deptid;
	private Integer userid;
	private String usercode;
	private Date updateTime;
	private Integer updatetype;
	private Integer rankid;
	private Integer proid;
	private Integer areaid;
	private Integer usersort;

	private String lxrTxt;

	// Constructors

	/** default constructor */
	public Deptuser() {
	}

	// Property accessors

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "deptid", unique = false, nullable = true, insertable = false, updatable = false)
	public Compdept getDept() {
		return dept;
	}

	public void setDept(Compdept dept) {
		this.dept = dept;
	}
	
	
	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "userid", unique = false, nullable = true, insertable = false, updatable = false)
	public UserInfo getUserInfo() {
		return userInfo;
	}

	

	public void setUserInfo(UserInfo userInfo) {
		this.userInfo = userInfo;
	}

	@Id
	@Column(name = "deptid", unique = true, nullable = false)
	public Integer getDeptid() {
		return deptid;
	}

	public void setDeptid(Integer deptid) {
		this.deptid = deptid;
	}

	@Id
	@Column(name = "userid", unique = true, nullable = false)
	public Integer getUserid() {
		return userid;
	}

	public void setUserid(Integer userid) {
		this.userid = userid;
	}

	@Column(name = "usercode", unique = false, nullable = true, insertable = true, updatable = true, length = 20)
	public String getUsercode() {
		return this.usercode;
	}

	public void setUsercode(String usercode) {
		this.usercode = usercode;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "update_time", unique = false, nullable = false, insertable = true, updatable = true, length = 19)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "updatetype", unique = false, nullable = false, insertable = true, updatable = true)
	public Integer getUpdatetype() {
		return this.updatetype;
	}

	public void setUpdatetype(Integer updatetype) {
		this.updatetype = updatetype;
	}

	@Column(name = "rankid", unique = false, nullable = false, insertable = true, updatable = true)
	public Integer getRankid() {
		return this.rankid;
	}

	public void setRankid(Integer rankid) {
		this.rankid = rankid;
	}

	@Column(name = "proid", unique = false, nullable = false, insertable = true, updatable = true)
	public Integer getProid() {
		return this.proid;
	}

	public void setProid(Integer proid) {
		this.proid = proid;
	}

	@Column(name = "areaid", unique = false, nullable = false, insertable = true, updatable = true)
	public Integer getAreaid() {
		return this.areaid;
	}

	public void setAreaid(Integer areaid) {
		this.areaid = areaid;
	}

	@Column(name = "usersort", unique = false, nullable = true, insertable = true, updatable = true)
	public Integer getUsersort() {
		return this.usersort;
	}

	public void setUsersort(Integer usersort) {
		this.usersort = usersort;
	}

	@Transient
	public String getLxrTxt() {
		return lxrTxt;
	}

	public void setLxrTxt(String lxrTxt) {
		this.lxrTxt = lxrTxt;
	}

}
